package com.bosch.in.rtp1.ept.manager;

import java.sql.SQLException;
import java.util.List;

import com.bosch.in.rtp1.ept.constant.HoldCodeType;
import com.bosch.in.rtp1.ept.model.dto.HoldCodeFilter;

/**
 * Business Delegate interface to define contract of service which is used to manipulate data
 * on HoldCode filter table
 * @author TPR1HC
 *
 */
public interface HoldCodeFilterManager {
	
	/**
	 * Get HoldeCode filters based on given type
	 * @return list of HoldCodeFilter object
	 * @throws SQLException 
	 */
	List<HoldCodeFilter> getHoldCodeFilters(HoldCodeType hcType) throws SQLException;
	
	/**
	 * Get all HoldeCode filters
	 * @return list of HoldCodeFilter object
	 * @throws SQLException 
	 */
	List<HoldCodeFilter> getAllHoldCodeFilters() throws SQLException ;
	
	/**
	 * update batch of HoldCodeFilter list 
	 * @param hcFilters list of HoldCodeFilter
	 * @return true if successfully updated
	 * @throws SQLException 
	 */
	boolean updateHoldCodeFilter(List<HoldCodeFilter> hcFilters) throws SQLException ;
	
	/**
	 * insert new HoldCodeFilter  
	 * @param hcFilter object
	 * @return automatically generated key
	 * @throws SQLException 
	 */
	int insertHoldCodeFilter(HoldCodeFilter hcFilter) throws SQLException ;
	
	/**
	 * delete HoldCodeFilter according to given identifer  
	 * @param id	identifier
	 * @return true if successfully deleted
	 * @throws SQLException 
	 */
	boolean deleteHoldCodeFilter(int id) throws SQLException ;
	
	/**
	 * re-order HoldCodeFilter following the order of given id list  
	 * @param idList	list of HoldeCodeFilter identifier
	 * @return true if reorder successfully 
	 * @throws SQLException 
	 */
	boolean reorderHoldCodeFilters(List<Integer> idList) throws SQLException ;
}
